package com.platform.service;

import com.platform.entity.InviteUserVo;
import com.platform.entity.InviteVo;
import com.platform.dao.ApiInviteMapper;

import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ApiInviteService {
    @Autowired
    private ApiInviteMapper inviteMapper;

    /**
     * 中大团队扩展
     * @param inviteCode
     * @return
     */
    public List<InviteVo> queryByInviteCode(String inviteCode){
        return inviteMapper.queryByInviteCode(inviteCode);
    }

    /**
     * 中大团队扩展
     * @param userId
     * @return
     */
    public List<String> queryRootDeptIdsByUserId(String userId){
        return inviteMapper.queryRootDeptIdsByUserId(userId);
    }

    public int checkShopKeeper(Long rootDeptId, Long userId){
        return inviteMapper.checkShopKeeper(rootDeptId, userId);
    }

    public int update(InviteVo inviteVo) { return inviteMapper.update(inviteVo); }

    public InviteVo queryObject(Object id) { return inviteMapper.queryObject(id); }
}
